#define  _CRT_SECURE_NO_WARNINGS  1
#include <stdio.h>
int Fib(int n)
{
	int a = 1, b = 1, c = 0;
	if (n > 2)
	{
		while(n>2)
		{
			c = a + b;
			a = b;
			b = c;
			n--;
		}
		return c;
	}
	else
		return 1;
}
int main()
{
	int a = 0;
	int n = 0;
	scanf("%d", &n);


	a = Fib(n);
	printf("%d", a);


	return 0;
}